import request from '@/utils/request'

export function getRoles(data) {
  return request({
    url: '/backup/web/role/get_roles',
    method: 'post',
    data
  })
}
export function addRole(data) {
  return request({
    url: '/backup/web/role/add_role',
    method: 'post',
    data
  })
}
export function updateRole(data) {
  return request({
    url: '/backup/web/role/update_role',
    method: 'post',
    data
  })
}
export function deleteRole(data) {
  return request({
    url: '/backup/web/role/delete_role',
    method: 'post',
    data
  })
}
export function getUsers(data) {
  return request({
    url: '/backup/web/user/get_users',
    method: 'post',
    data
  })
}
/** 绑定或修改角色与用户关系数据*/
export function addUpdateRoles(data) {
  return request({
    url: '/backup/web/role/add_update_roles',
    method: 'post',
    data
  })
}
/** 绑定或修改角色与用户关系数据*/
export function getusersByrole(params) {
  return request({
    url: '/backup/web/user/get_users_by_role',
    method: 'get',
    params
  })
}
